import request from '@/utils/request'
// 词库等工具类需要的接口



// 查询添加词库所需的广告组

export const findListWords = (params) => {
  return request({
    method: 'get',
    url: '/adgroups/findListWords',
    params
  })
}

// 查询词库接口
export const findWordStore = (params) => {
  return request({
    method: 'get',
    url: '/words/classification',
    params
  })
}

// 创建词库
export const crateWordsGroup = (data) => {
  return request({
    method: 'POST',
    url: '/words/crateWordsGroup',
    data: data
  })
}

// 复制词库
export const copyWordsList = (data) => {
  return request({
    method: 'POST',
    url: '/words/copyWordsList',
    data: data
  })
}

// 下载词库
export const downloadWords = (params) => {
  return request({
    method: 'get',
    url: '/words/downloadWords',
    params
  })
}

// 验证词库是否重名
export const  reallocate= (params) => {
  return request({
    method: 'get',
    url: '/words/reallocate',
    params
  })
}

// 修改词库名称
export const UpWordsUser = (data) => {
  return request({
    method: 'POST',
    url: '/words/UpWordsUser',
    data: data
  })
}

// 删除词库
export const deleWordsList = (data) => {
  return request({
    method: 'POST',
    url: '/words/delWordsUserList',
    data: data
  })
}


// 词库详情

// 查询词库详情
export const getWordStoreInfo = (params) => {
  return request({
    method: 'get',
    url: '/words/wordParticulars',
    params
  })
}

// 添加关键词到词库
export const addWordsToStore = (data) => {
  return request({
    method: 'POST',
    url: '/words/addWords',
    data: data
  })
}


// 删除词库内的关键词
export const delWordInStore = (data) => {
  return request({
    method: 'POST',
    url: '/words/delWordsList',
    data: data
  })
}

// 修改词库内的关键词

export const modifyWordInStore = (data) => {
  return request({
    method: 'POST',
    url: '/words/upWordList',
    data: data
  })
}


// 添加词库到广告组
export const shiftAdvGroup = (data) => {
  return request({
    method: 'POST',
    url: '/words/shiftAdvGroup',
    data: data
  })
}


// 添加推荐词到广告组
export const recommendWordShiftAdvGroup = (data) => {
  return request({
    method: 'POST',
    url: '/words/recommendWordShiftAdvGroup',
    data: data
  })
}


// 拓词接口

export const  findOpenUpWords = (data) => {
  return request({
    method: 'post',
    url: '/keywordsApp/findOpenUpWords',
    data
  })
}
